package com.example.springbootlucenedemo.common.lucene.bean;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.Sort;
import org.apache.lucene.search.SortField;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class Page implements Serializable {
    private  int pageNumber = 1;
    private  int size = 10;
    private Map<String, String> query = new HashMap<>();
    @JsonIgnore
    private Sort sort = new Sort(SortField.FIELD_SCORE);
    public int getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(int pageNumber) {
        this.pageNumber = pageNumber;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public Map<String, String> getQuery() {
        return query;
    }

    public void setQuery(Map<String, String> query) {
        this.query = query;
    }

    public Sort getSort() {
        return sort;
    }

    public void setSort(Sort sort) {
        this.sort = sort;
    }
}
